{include file=header.html}
<script language="javascript" type="text/javascript" src="{res file=js/jquery-1.2.6.js}"></script>
<script language="javascript" type="text/javascript" src="{lib file=jquery.plugins/jquery.validate.js}"></script>
<script type="text/javascript">
$(function(){
	$('#fabric_shop_form').validate({
        onkeyup : false,
		onfocusout : false,
        rules : {
			fabric_shop_name: {
				required: true,
				remote: 'index.php?app=fabric_shop&act=check_name&fabric_shop_name=' + $('#fabric_shop_name').val(){if $smarty.get.act eq 'edit'} + '&fabric_shop_id={$smarty.get.fsid}'{/if}
			}
		},
		messages : {
			fabric_shop_name: {
				required: '<br />{$lang.fabric_shop_name_not_empty}',
				remote: '<br />{$lang.fabric_shop_is_exist}'
			}
		}
	 });
});
</script>
<style>
label.error {margin-left:2em; color:#FF0000;}
.tab-frame{width:700px;}
</style>
<body>
<div class="sub-body">
<div class="tab-frame">
<div class="tab-title-1">
<!--{if $smarty.get.act eq 'edit'}--><span>{$lang.edit_fabric_shop}</span><!--{else}--><span>{$lang.add_new_fabric_shop}</span><!--{/if}-->
</div>
<form action="{url app=fabric_shop&act=$smarty.get.act}{if $smarty.get.fsid}&amp;fsid={$smarty.get.fsid}{/if}" method="post" id="fabric_shop_form">
<table width="100%" cellspacing="0" cellpadding="0" class="tab-display">
	<tr>
		<th width="100" align="right">{$lang.fabric_shop_name}：</th>
		<td align="left"><input type="text" name="fabric_shop_name" id="fabric_shop_name" value="{$fabric_shop.fabric_shop_name}" class="input-7"/></td>
	</tr>
	<tr>
		<th width="100" align="right">{$lang.fabric_type}：</th>
		<td align="left"><select name="type_id" id="type_id">
			<option value="0"></option>
			{html_options options=$fabric_types selected=$fabric_shop.type_id}
        </select></td>
	</tr>
	<tr>
		<th align="right">{$lang.description}：</th>
		<td align="left"><textarea name="description" rows="6" class="input-7">{$fabric_shop.description}</textarea></td>
	</tr>
	<tr>
		<th align="right">{$lang.if_show}：</th>
		<td align="left"><label><input type="radio" name="if_show" value="1" {if $fabric_shop.if_show == 1}checked="checked"{/if} />{$lang.yes}</label>&nbsp;&nbsp;&nbsp;&nbsp;<label><input type="radio" name="if_show" value="0" {if $fabric_shop.if_show == 0}checked="checked"{/if} />{$lang.no}</label></td>
	</tr>
	<tr>
		<td colspan="2" align="center"><input type="submit" value="{$lang.submit}" class="btn-2"/></td>
	</tr>
</table>
</form>
<script language="javascript" type="text/javascript" src="{res file=js/tab_color.js}"></script>
</div>
</div>
</body>
</html>